﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ServiceModel.Web;
using ContratanteService.Dominio;


namespace OfertanteService
{
    [ServiceContract]
    public interface IOfertantes
    {
        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Ofertantes/{razon_social},{departamento},{provincia},{distrito},{categoria},{producto}", ResponseFormat = WebMessageFormat.Json)]
        List<Ofertante> BuscarOfertante(string razon_social, string departamento, string provincia, string distrito, string categoria, string producto);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Ofertantes/listar/{tipo}", ResponseFormat = WebMessageFormat.Json)]
        List<Ofertante> ListarOfertantes(string tipo);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Ofertantes/{id}", ResponseFormat = WebMessageFormat.Json)]
        Ofertante ObtenerOfertante(string id);

        [OperationContract]
        [WebInvoke(Method = "PUT", UriTemplate = "Ofertantes", ResponseFormat = WebMessageFormat.Json)]
        Ofertante ModificarOfertante(Ofertante ofertanteAModificar);

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "Ofertantes", ResponseFormat = WebMessageFormat.Json)]
        Ofertante CrearOfertante(Ofertante ofertanteACrear);

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "Productos", ResponseFormat = WebMessageFormat.Json)]
        Producto crearProducto(Producto productoACrear);
    }
}
